var form;
var table;
layui.use(['form','table'],function(){
    form = layui.form;
    table=layui.table;
//课程分类下拉菜单
    $.ajax({
        url: "/SyOperationController/selCourseClassSelect",
        type: "get",
        dataType: "json",
        success: function (data) {
            for(var a=0;a<data.data.length;a++){
                $("#class_id").append("<option value='"+data.data[a].id+"'>"+data.data[a].name+"</option>");
            }
            form.render();
        }
    });

});

//确定查询
function selCourses() {

    var class_id=$("#class_id option:selected").val();
    var course_name=$("#course_name").val();
    var course_nprice=$("#course_nprice").val();
    var user_id=$("#user_id").val();
    var status=$("#status option:selected").val();
    var cstatus=$("#cstatus option:selected").val();

    parent.$("#city").val(class_id);
    parent.$("#actId").val(course_name);
    parent.$("#accId").val(course_nprice);
    parent.$("#user_id").val(user_id);
    parent.$("#status").val(status);
    parent.$("#cstatus").val(cstatus);

    parent.seTab1();
    var index=parent.layer.getFrameIndex(window.name);
    parent.layer.close(index);


};


//重置
function chongzhi(){
    $("input").val("");
    $(this).find("option:selected").removeAttr("selected");
}
